package com.hoseok.english;

import com.hoseok.english.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

/**
 * easy, intermediate, advanced
 * @author Administrator
 *
 */	
	
public class TestMenuActivity extends Activity{
	
	private Button mEasy; 
	private Button mIntermediate;
	private Button mAdvanced;
	private Intent mIntent;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
	
		setContentView(R.layout.test_menu_layout);
		
		mEasy = (Button) findViewById(R.id.easy);
		mIntermediate  = (Button)findViewById(R.id.intermediate);
		mAdvanced = (Button)findViewById(R.id.advanced);
	
        mEasy.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				mIntent = new Intent(getApplicationContext(), EasyArticleTest.class);
				mIntent.putExtra("level", 0);
				startActivity(mIntent);
			}
		});	  
	
        mIntermediate.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				mIntent = new Intent(getApplicationContext(), EasyArticleTest.class);
				mIntent.putExtra("level", 1);
				startActivity(mIntent);
			}
		});	  
	
        mAdvanced.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				mIntent = new Intent(getApplicationContext(), EasyArticleTest.class);
				mIntent.putExtra("level", 2);
				startActivity(mIntent);
			}
		});	  
	
	}

}
